import { ref } from 'vue'
import { findBanner } from '@/api/home'

const useBanner = () => {
  const bannerList = ref([])
  async function loadBannerList () {
    // 参数修改
    // ajax
    const res = await findBanner()
    bannerList.value = res.result
  }

  // 调用函数
  loadBannerList()

  return bannerList
}

export { useBanner }
